package com.sylli.oeuf.server.game.logic.invocation;

import com.sylli.oeuf.server.game.logic.BattleActor;
import com.sylli.oeuf.server.game.logic.CastingTarget;
import com.sylli.oeuf.server.game.logic.EventParameter;

public abstract class EnoughValueInvocationCondition extends InvocationCondition {

	protected abstract int getCurrentValue(int invocationRank, BattleActor caster);
	
	@Override
	public boolean shouldInvoke(int rank, BattleActor caster,
			CastingTarget target, EventParameter param) {
		return getCurrentValue(rank, caster) > getAgainstValue(rank);
	}
	
	public abstract int getAgainstValue(int rank);

}
